package myApp.mobile;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import myApp.classi.Connection;

public class BuyExtra extends Activity
{
  Connection a;
  private ArrayAdapter<CharSequence> m_adapterForSpinner;
  private Spinner m_myDynamicSpinner;

  private void fillSpinner(String paramString)
  {
    this.m_adapterForSpinner.add(paramString);
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903040);
    this.a = new Connection();
    Button localButton = (Button)findViewById(2131165186);
    TextView localTextView = (TextView)findViewById(2131165187);
    this.m_myDynamicSpinner = ((Spinner)findViewById(2131165185));
    ArrayAdapter localArrayAdapter = new ArrayAdapter(this, 17367048);
    this.m_adapterForSpinner = localArrayAdapter;
    this.m_adapterForSpinner.setDropDownViewResource(17367049);
    this.m_myDynamicSpinner.setAdapter(this.m_adapterForSpinner);
    String[] arrayOfString = this.a.getAllCat().split("!i!");
    int i = 0;
    while (true)
    {
      int j = arrayOfString.length;
      String str;
      if (i >= j)
        str = "wrong";
      try
      {
        File localFile1 = Environment.getExternalStorageDirectory();
        if (localFile1.canWrite())
        {
          File localFile2 = new File(localFile1, "mBusData.txt");
          FileReader localFileReader = new FileReader(localFile2);
          BufferedReader localBufferedReader = new BufferedReader(localFileReader);
          str = localBufferedReader.readLine();
          str = str.split("!i!")[0];
          localBufferedReader.close();
        }
        localTextView.setText(String.valueOf(Math.floor(100.0D * Double.parseDouble(this.a.getBalance(str))) / 100.0D) + " €");
        BuyExtra.1 local1 = new BuyExtra.1(this);
        localButton.setOnClickListener(local1);
        return;
        fillSpinner(arrayOfString[i]);
        i++;
      }
      catch (IOException localIOException)
      {
        while (true)
          Log.e("SD", "Could not read file " + localIOException.getMessage());
      }
    }
  }
}

/* Location:           C:\Users\Spider22\Desktop\TesiMBUS\classes_dex2jar.jar
 * Qualified Name:     myApp.mobile.BuyExtra
 * JD-Core Version:    0.6.1
 */